LOOKBIBTEX

Section: User Commands (1)
Updated: 5 September 1991
Index Return to Main Contents

 

NAME

lookbibtex - find references in a bibtex database

 

SYNOPSIS

lookbibtex [ -s ] [ -f field ] regexp [ bibfiles... ]

 

DESCRIPTION

lookbibtex searches through bibtex databases, printing entries that match regexp. See bibtex(1) for a description of bibtex databases. Regexp is a Perl regular expression. See perl(1) for an explanation of differences between perl and standard regular expressions.

The -s option passes @string defintions through. By default, they're eaten.

Searches can be limited to particular bibtex fields with the -f option.

If no bibfiles are specified, all bibtex files in the path BIBINPUTS are used. A - for bibfiles reads a bibtex database from standard input.

To do "and" searches on two fields use shell pipes, reading the output of one search as the bibliography of the second (using `-' for bibfiles in a pipeline). For example, to find what someone named Kafka wrote about emacs keyboard layout, do:

lookbibtex -f author kafka | lookbibtex -f title meta -

To do "or" searches, use regular expressions. For example, you could be concerned with only careful authors, like Kunth and Kafka:

lookbibtex -f author 'kunth|kafka'

More sophisticated searches can be achieved by combining these techniques.

 

AUTHOR

John Heidemann <johnh@cs.ucla.edu>

 

ENVIRONMENT VARIABLES

BIBINPUTS
The path BIBINPUTS is searched for .bib files if none are given on the command line. See TeX(1) for a description of the path format.

 

SEE ALSO

bibtex(1), bibdestringify(1), perl(1).

 

BUGS

Lookbibtex is written in Perl, so it will not run on machines which do not have perl installed (although this arguably a bug of the person too lazy to install such a useful tool).

Multiple bibtex fields on one line will be missed.

There should be a way of switching off the file name prefixing when searching multiple files. For now, simply cat the files into lookbib.

This program does not implement a full bibtex parser, just a good approximation. Because of this, it may fail on unusual bibtex files. In particular, the @ that begins a bibtex entry, and the } which end it must be the first non-whitespace character on their line, or they will be missed. Also, multi-line fields surrounded with double quotes or curley brackets are handled correctly, but ugly combinations of quotes and brackets and backslashed versions of the same may fail. Umlaut accents are removed from the search string.

I make no predictions as to how this program will react to bibtex files with syntax errors.


 

Index

NAME
SYNOPSIS
DESCRIPTION
AUTHOR
ENVIRONMENT VARIABLES
SEE ALSO
BUGS

This document was created by man2html, using the manual pages.
Time: 01:32:06 GMT, February 01, 2023